package priv.pront.code.mati.province;

import java.util.Scanner;

/**
 * @Description:
 * @Author: pront
 * @Time:2023-11-17 15:43
 */
public class MC0216_淘金者 {

    static String s;
    static String c;
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        s = scanner.next();
        c = scanner.next();
        System.out.println(s.indexOf(c) != -1 ? s.indexOf(c) + 1 : -1);
    }
}
